// TermVariable.cpp : implementation file
//
/*
#ifndef _TERMVARIABLE_CPP
#define _TERMVARIABLE_CPP

#ifdef _STDAFX_H
*/
#include "stdafx.h"

//#endif 

#include "TermVariable.h"

/*
#ifndef _TYPE_CPP
#include "Type.cpp"
#endif

#ifndef _APPLICATIONTERM_CPP*/
#include "ApplicationTerm.h"
//#endif


Term::pointer TermVariable::normalized() const{
	return static_cast<Term::pointer>(this->clone());
}
Token::pointer TermVariable::applyArgument(Token::const_reference To)  const{
	return new ApplicationTerm(*this, To);
}

TermVariable::TermVariable(const Type& Ty, const string& ss):Term(Ty,ss){}
TermVariable::TermVariable(const TermVariable& Ter):Term(Ter){}
TermVariable::~TermVariable(){}

/**********************
FreeTermVariables
***********************/
FreeTermVariable::FreeTermVariable(const Type& Ty, const string& ss):TermVariable(Ty,ss){}
Token::pointer FreeTermVariable::clone() const{
	return new FreeTermVariable(*this);
}

bool FreeTermVariable::TypeOccursinFreeVariable(Type::const_reference Ty) const{
		return getType().hasSubType(Ty);
	}
/*************************
BoundedTermVariables
*************************/
BoundedTermVariable::BoundedTermVariable(const Type& Ty):TermVariable(Ty){}
Token::pointer BoundedTermVariable::clone() const{
	return new BoundedTermVariable(*this);
}

//#endif

// TermVariable member functions
